package com.andyage.admin.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.andyage.admin.bean.IncomeBean;
import com.andyage.admin.dao.IncomeMapper;
import com.andyage.admin.service.IIncomeService;
import com.andyage.util.JsonContent;
@Service
public class IncomeServiceImpl implements IIncomeService {
	@Resource
	private IncomeMapper incomeMapper;
	@Override
	public String queryIncomeByPrijectTitle(IncomeBean income) {
		try {
			List<IncomeBean> list = incomeMapper.queryIncomeByPrijectTitle(income);
			int total = incomeMapper.queryIncomeByPrijectTitleCount(income);
			String json = JsonContent.getJsonArray(list, total);
			return json;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

}
